<template>
  <div id="app">
    <template v-if="route.path.startsWith('/user')" >
      <router-view />
    </template>
    <template v-else>
      <BasicLayout />
    </template>

  </div>
</template>
<script setup lang="ts">
import BasicLayout  from '@/layouts/BasicLayout'
import { useRouter } from "vue-router";
import { useRoute } from "vue-router";
import { ACCESS_ENUM } from "@/access/accessEnum.ts";
import {useStore} from 'vuex'
//跳转之前判断是否具备访问当前权限的路
const router = useRouter();
const route = useRoute();
const store = useStore();
// router.beforeEach((to, from, next) => {
//   if(to.meta?.access===ACCESS_ENUM.ADMIN ){
//     if(store?.state?.user?.user?.userRole!==ACCESS_ENUM.ADMIN){
//       next({path:'/noAuth'})
//     }
//   }
//   next();
// })

</script>
<style scoped>
#app {
}
</style>
